package com.sali.commons.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @description:
 * @author: sali
 * @date: 2025/3/2 下午1:08.
 * @version: 1.0
 */
public class PropertiesUtil {

    public static Properties load(String name) {
        Properties properties = new Properties();
        InputStream inputStream = null;
        try {
            inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(name);
            properties.load(inputStream);
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            CloseableUtil.close(inputStream);
        }
        return properties;
    }

}
